const path=require('path')
module.exports = {
  configureWebpack: {
    resolve: {
      /* 为路径配置别名 */
      alias: {
        "assets": "@/assets",
        "common": "@/common",
        "components": "@/components",
        "network": "@/network",
        "views":"@/views"
      }
    }
  },
  publicPath: './',
  //配置跨域请求
  devServer: {
    contentBase:path.join(__dirname,'src'),
      open: true,    //是否自动打开浏览器
      https: false,    //是否开启https
      hotOnly: false,
      proxy: { // 配置跨域
          '/api': {
              target: 'https://s10.mogucdn.com',   //请求接口域名  
              ws: true,
              secure: false,
              changOrigin: true,    //是否允许跨越
              pathRewrite:{
                '^/api':''
              }
          },
      },
      before: app => { },
  }
}
